/**
 * 
 * table contains a composite key
 */

package com.rst.user.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author JavaDeamon
 *
 */
@Entity
@Table(name="USER_ROLE_MAPPING")
public class UserRoleMappingDTO implements Serializable{

	private static final long serialVersionUID = 2159422312833380016L;
	
	private String userId;
	private String roleId;
	
	
	/**
	 * @return the userId
	 * stores the user id 
	 * column cannnot be null
	 * maximum length 30 as of userid in user details table
	 */
	@Id
	@Column(name="USER_ID", length=30)
	public String getUserId() {
		return userId;
	}
	/**
	 * @return the roleId
	 * stores the role id
	 * column cannot be null
	 * maximum length 20 as of role id in role details table
	 */
	@Id
	@Column(name="ROLE_ID", length=20)
	public String getRoleId() {
		return roleId;
	}
	/**
	 * @param userId the userId to set
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}
	/**
	 * @param roleId the roleId to set
	 */
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "UserRoleMapping [userId=" + userId + ", roleId=" + roleId + "]";
	}
	
	
}
